package lab02.test06;

import java.util.Scanner;

/**
 * Created by 林云志 on 2017/10/14.
 */
public class Ladder {


    public static void main(String[] args) {
        double upbase;
        double downbase;
        double high;
        double area;
        System.out.println("请输入上底、下底和高");
        Scanner ladder = new Scanner(System.in);
        upbase = ladder.nextInt();
        downbase = ladder.nextInt();
        high = ladder.nextInt();
        System.out.println("面积为："+area(upbase,downbase,high));
    }
    static double area(double upbase, double downbase,double high){
        double area = (upbase + downbase)* high/2;
        return area;

    }

}
